# -*- coding: utf-8 -*-
#error_code.py
#tianya的错误从60000开始
import logging

import xmw

#THREAD_NOT_EXIST=xmw.Error(code=60001,msg="Thread Not Exist!",level=xmw.ERROR_WARNING)

class OK(xmw.Error):
    code=60000
    msg="OK!"
    level=logging.INFO
    name="OK"

class THREAD_NOT_EXIST(xmw.Error):
    code=60001
    msg="Thread Not Exist!"
    level=logging.WARNING
    name="THREAD_NOT_EXIST"

        
class ARGUMENT_FAULT(xmw.Error):
    code=60002
    msg="Argument Fault!"
    level=logging.ERROR
    name    ="ARGUMENT_FAULT"

class THREAD_EXIST(xmw.Error):
    code=60003
    msg="Thread already Exist!"
    level=logging.WARNING
    name="THREAD_EXIST"

class THREAD_PAGE_REFRESH(xmw.Error):
    code=60004
    msg="Refresh Thread Page List!"
    level=logging.INFO
    name="THREAD_PAGE_REFRESH"

class THREAD_ADDED(xmw.Error):
    code=60005
    msg="Thread added!"
    level=logging.INFO
    name="THREAD_ADDED"

class PAGE_EXIST(xmw.Error):
    code=60006
    msg="Page Exist!"
    level=logging.INFO
    name="PAGE_EXIST"
    
def main():
    e=THREAD_NOT_EXIST(note="test")
    e.log()
    print e.__class__
if __name__ == "__main__":
    main()